from gui import gui

class application_window_fake :
    pass

class frame_fake :
    def __init__ ( self , master ) :
        self . _received_pack_args = [ ]
    def pack ( self , _fake_arg = None , padx = None , pady = None , fill = None , side = None ) :
        self . _received_pack_args = [ padx , pady , fill , side ]

class tkinter_fake :
    def __init__ ( self ) :
        self . _application_windows = [ ]
        self . _frame_collection = [ ]
    def Tk ( self ) :
        window = application_window_fake ( )
        self . _application_windows += [ window ]
        return window
    def Frame ( self , master ) :
        frame = frame_fake ( master )
        self . _frame_collection += [ frame ]
        return frame

class mediator_fake :
    def __init__ ( self ) :
        self . _gui_create_application_window_reply = None
        self . _gui_create_frame_reply = None
    def gui_create_application_window_reply ( self , window ) :
        self . _gui_create_application_window_reply = window
    def gui_create_frame_reply ( self , frame ) :
        self . _gui_create_frame_reply = frame 

class gui_pack_tests :
    'gui_pack'
    def __init__ ( self , test ) :
        self . _test = test
        self . _tkinter = tkinter_fake ( )
        self . _mediator = mediator_fake ( )
        self . _gui = gui ( mediator = self . _mediator , tkinter = self . _tkinter , tkfont = None , scheduler = None )
    def test_gui_pack ( self ) :
        self . _gui . gui_create_application_window_request ( )
        window = self . _mediator . _gui_create_application_window_reply
        self . _gui . gui_create_frame_request ( window )
        frame = self . _mediator . _gui_create_frame_reply
        self . _gui . gui_pack ( frame , 'my padx' , 'my pady' , 'my fill' , 'my side' )
        self . _test . assume_equal ( self . _tkinter . _frame_collection [ 0 ] . _received_pack_args , [
            'my padx' , 'my pady' , 'my fill' , 'my side'
            ] )
